<template>
  <div id="ctrade_box">
      <div class="ctrade">
        <div class="ctrade_tab">
          <span class="li-tab" v-for="(item,index) in tabsParam"
          @click="toggleTabs(index)"
          :class="[{active:index===nowIndex},{cur:nowIndex==index}]">{{item}}
        </span>
        </div>
      </div>
      <div class="ctrade_tabbox">
        <jingzhun v-show="nowIndex===0"></jingzhun>
        <qianzai v-show="nowIndex===1"></qianzai>
      </div>
  </div>
</template>
<script>
import jingzhun from "@/components/first/firstlist/jingzhun"          //新增精准客源
import qianzai from "@/components/first/firstlist/qianzai"           //新增潜在客源

export default {
  name: 'newCreate',
  components:{
    'jingzhun': function(resolve) {
        require(['@/components/first/firstlist/jingzhun.vue'], resolve);
    },
    'qianzai': function(resolve) {
        require(['@/components/first/firstlist/qianzai.vue'], resolve);
    }
  },
  data() {
    return{
      tabsParam:['新增精准客户','新增潜在客户'],
      nowIndex:0,
      isShow:false,
      change:'change'
    }
  },
  methods:{
    //切换tab项
    toggleTabs(index){
      this.nowIndex = index;
      //$(window).resize();
    }
  }
}
</script>
<style lang="scss" scoped>
.cur{
  color:rgb(255,255,255);
}
.ctrade{
  width:100%;
  height:100%;
  position: fixed;
  background: rgb(247,247,247);
  background-image:url("./img/a.png");
  background-repeat: no-repeat;
  background-size: 100% 1.45rem;
}
.ctrade_tab{
  width:100%;
  display:flex;
  justify-content: space-around;
  color:rgba(255,255,255,0.65);
  font-size:0.14rem;
  position:fixed;
  top:0.7rem;
}
.ctrade_tabbox{
  width:100%;
  height:100%;
  display:flex;
  justify-content:center;
  position:fixed;
  top:1.05rem;
  overflow-y: scroll;
  overflow-x: hidden;
}


</style>
